package com.kele.utils;

import com.auth0.jwt.JWT;
import com.auth0.jwt.algorithms.Algorithm;
import com.kele.entity.Employee;
import com.kele.entity.User;
import com.sun.org.apache.xml.internal.security.algorithms.JCEMapper;

/**
 * @title：
 * @author: kele
 * @date: 2021年01月15日 15:56
 * @description:
 */
public class CreateToken {

    public String getToken(Employee employee){

        String token="";
        token= JWT.create().withClaim("employeeId",employee.getId())
                            .sign(Algorithm.HMAC256(employee.getPassword()));
        return token;
    }
}
